
require "skynet.manager"
local skynet = require "skynet"

local MessageDispatch = require "MessageDispatch"
local MessageHandler = require "worker.MessageHandler"


global = {}
local function init()

	local message_dispatch = MessageDispatch.new()	

	local message_handler = MessageHandler.new(message_dispatch)

	skynet.dispatch("lua", message_dispatch:dispatch())	
		
end

---------------------------------------------------------
-- skynet
---------------------------------------------------------

skynet.start(function()

	init()
	
	-- skynet.register('.manager')
end)
